﻿CREATE TABLE [dbo].[t_ADS_Group] (
    [SID]           VARCHAR (64)  NOT NULL,
    [DomainContext] VARCHAR (128) NOT NULL,
    [DN]            VARCHAR (512) NOT NULL,
    [CN]            AS            (CONVERT([varchar](64),[dbo].[clr_RegEx_MatchGroup]([DN],'^.+?=([^,]+)',(1)),(0))) PERSISTED,
    [ContainerDN]   AS            ([dbo].[clr_RegEx_MatchGroup]([DN],N'[,](.+)',(1))) PERSISTED
);

